﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace temportal
{
    class Move
    {
        static public void Update(Vector4 direction,Unit player)
        {
            if( !direction.Equals(new Vector4(0.0f,0.0f,0.0f,0.0f)) )
            {
                //Left
                if (direction.Y == 1.0f)
                    player.position.X -= player.fullSpeed;
                //Right
                if (direction.W == 1.0f)
                    player.position.X += player.fullSpeed;
                //Up
                if (direction.X == 1.0f)
                    player.position.Y -= player.fullSpeed;
                //Down
                if (direction.Z == 1.0f)
                    player.position.Y += player.fullSpeed;
            }
        }
    }
}
